home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 22 / Cream of the Crop 22.iso / math / ast53src.zip / CHARTS0.C < prev    next >
C/C++ Source or Header  |  1996-09-29  |  47KB  |  1,207 lines

  1. /*
  2. ** Astrolog (Version 5.30) File: charts0.c
  3. **
  4. ** IMPORTANT NOTICE: The graphics database and chart display routines
  5. ** used in this program are Copyright (C) 1991-1996 by Walter D. Pullen
  6. ** (Astara@msn.com, http://www.magitech.com/~cruiser1/astrolog.htm).
  7. ** Permission is granted to freely use and distribute these routines
  8. ** provided one doesn't sell, restrict, or profit from them in any way.
  9. ** Modification is allowed provided these notices remain with any
  10. ** altered or edited versions of the program.
  11. **
  12. ** The main planetary calculation routines used in this program have
  13. ** been Copyrighted and the core of this program is basically a
  14. ** conversion to C of the routines created by James Neely as listed in
  15. ** Michael Erlewine's 'Manual of Computer Programming for Astrologers',
  16. ** available from Matrix Software. The copyright gives us permission to
  17. ** use the routines for personal use but not to sell them or profit from
  18. ** them in any way.
  19. **
  20. ** The PostScript code within the core graphics routines are programmed
  21. ** and Copyright (C) 1992-1993 by Brian D. Willoughby
  22. ** (brianw@sounds.wa.com). Conditions are identical to those above.
  23. **
  24. ** The extended accurate ephemeris databases and formulas are from the
  25. ** calculation routines in the program "Placalc" and are programmed and
  26. ** Copyright (C) 1989,1991,1993 by Astrodienst AG and Alois Treindl
  27. ** (alois@azur.ch). The use of that source code is subject to
  28. ** regulations made by Astrodienst Zurich, and the code is not in the
  29. ** public domain. This copyright notice must not be changed or removed
  30. ** by any user of this program.
  31. **
  32. ** Initial programming 8/28,30, 9/10,13,16,20,23, 10/3,6,7, 11/7,10,21/1991.
  33. ** X Window graphics initially programmed 10/23-29/1991.
  34. ** PostScript graphics initially programmed 11/29-30/1992.
  35. ** Last code change made 9/22/1996.
  36. */
  37.  
  38. #include "astrolog.h"
  39.  
  40.  
  41. /*
  42. ******************************************************************************
  43. ** Table Display Routines.
  44. ******************************************************************************
  45. */
  46.  
  47. /* A subprocedure of the credit displayed below, this prints out one line */
  48. /* of credit information on the screen. Given a string, it's displayed    */
  49. /* centered with left and right borders around it, in the given color.    */
  50.  
  51. void PrintW(sz, col)
  52. char *sz;
  53. int col;
  54. {
  55.   int i;
  56.  
  57.   if (!sz) {
  58.  
  59.     /* Null string means print the top, bottom, or a separator row. */
  60.  
  61.     if (col < 0)
  62.       AnsiColor(kRed);
  63.     PrintCh((char)(col ? (col > 0 ? chSW : chNW) : chJE));
  64.     PrintTab(chH, CREDITWIDTH);
  65.     PrintCh((char)(col ? (col > 0 ? chSE : chNE) : chJW));
  66.   } else {
  67.     i = CchSz(sz);
  68.     PrintCh(chV);
  69.     PrintTab(' ', (CREDITWIDTH-i)/2 + (i&1));
  70.     AnsiColor(col);
  71.     PrintSz(sz);
  72.     PrintTab(' ', (CREDITWIDTH-i)/2);
  73.     AnsiColor(kRed);
  74.     PrintCh(chV);
  75.   }
  76.   PrintL();
  77. }
  78.  
  79.  
  80. /* Display a list of credits showing those who helped create the various  */
  81. /* parts of Astrolog, as well as important copyright and version info, as */
  82. /* displayed with the -Hc switch.                                         */
  83.  
  84. void DisplayCredits()
  85. {
  86.   char sz[cchSzDef];
  87.  
  88.   PrintW(NULL, -1);
  89.   sprintf(sz, "** %s version %s **", szAppName, szVersionCore);
  90.   PrintW(sz, kWhite);
  91.   sprintf(sz, "As of %s. By Walter D. Pullen", szDateCore);
  92.   PrintW(sz, kLtGray);
  93.   sprintf(sz, "(%s)", szAddressCore); PrintW(sz, kCyan);
  94.   PrintW(NULL, 0);
  95.   PrintW("Main planetary calculation formulas were converted from", kGreen);
  96.   PrintW(
  97.     "routines by James Neely, as listed in 'Manual of Computer Programming",
  98.     kGreen);
  99.   PrintW(
  100.     "for Astrologers' by Michael Erlewine, available from Matrix Software.",
  101.     kGreen);
  102.   PrintW("PostScript graphics routines by Brian D. Willoughby.", kYellow);
  103.   PrintW(
  104.     "Extended ephemeris calculation and formulas are by Alois Treindl,",
  105.     kMagenta);
  106.   PrintW(
  107.     "as in the package 'Placalc', available from Astrodienst AG.", kMagenta);
  108.   PrintW(
  109.     "IMPORTANT: Astrolog is 'freeware', but is copyrighted and not in public",
  110.     kLtGray);
  111.   PrintW(
  112.     "domain. Permission is granted to freely use and distribute these",
  113.     kLtGray);
  114.   PrintW(
  115.     "routines provided one does not sell, restrict, or profit from the",
  116.     kLtGray);
  117.   PrintW(
  118.     "program or its output in any way. Modification is allowed provided",
  119.     kLtGray);
  120.   PrintW(
  121.     "these exact notices remain with any altered or edited versions of the",
  122.     kLtGray);
  123.   PrintW(
  124.     "program. These conditions are true of both the program in whole and of",
  125.     kLtGray);
  126.   PrintW(
  127.     "all parts by any individual author. Violators are subject to copyright",
  128.     kLtGray);
  129.   PrintW(
  130.     "law penalties, and negative karmic debts to aforementioned contributors.",
  131.     kLtGray);
  132.   PrintW(NULL, 0);
  133.   PrintW(
  134.     "Special thanks to all those unmentioned, seen and unseen, who have",
  135.      kBlue);
  136.   PrintW(
  137.     "pointed out problems, suggested features, & sent many positive vibes! :)",
  138.     kBlue);
  139.   PrintW(NULL, 1);
  140.   AnsiColor(kDefault);
  141. }
  142.  
  143.  
  144. /* Print out a command switch or keypress info line to the screen, as done  */
  145. /* with the -H switch or 'H' key in a graphic window. This is just printing */
  146. /* out the string, except in Ansi mode we set the proper colors: Red for    */
  147. /* header lines, Green for individual switches or keys, and White for the   */
  148. /* rest of the line telling what it does. We also prefix each switch with   */
  149. /* either Unix's '-' or PC's '/', whichever is appropriate for the system.  */
  150.  
  151. void PrintS(sz)
  152. char *sz;
  153. {
  154.   int chDash;
  155.   char ch;
  156.  
  157.   chDash = sz[1];
  158.   if (*sz != ' ')
  159.     AnsiColor(kRed);
  160.   else if (chDash != ' ')
  161.     AnsiColor(chDash == 'P' || sz[3] == ' ' || sz[3] == ':' ?
  162.       kGreen : kDkGreen);
  163.   else
  164.     AnsiColor(kDefault);
  165.   while ((ch = *sz) && ch != ':' &&
  166.     (chDash != 'P' || (ch != ' ' || *(sz+1) != 't'))) {
  167.     if (ch != '_')
  168.       PrintCh(ch);
  169.     else
  170.       PrintCh(chSwitch);
  171.     sz++;
  172.   }
  173.   if (*sz)
  174.     PrintCh(*sz++);
  175.   AnsiColor(kDefault);
  176.   while (ch = *sz) {
  177.     if (ch != '_')
  178.       PrintCh(ch);
  179.     else
  180.       PrintCh(chSwitch);
  181.     sz++;
  182.   }
  183.   PrintL();
  184. }
  185.  
  186.  
  187. /* Print a list of every command switch that can be passed to the program, */
  188. /* and a description of what it does. This is what the -H switch prints.   */
  189.  
  190. void DisplaySwitches()
  191. {
  192.   char sz[cchSzDef];
  193.  
  194.   sprintf(sz, "%s (version %s) command switches:", szAppName, szVersionCore);
  195.   PrintS(sz);
  196.   PrintS(" _H: Display this help list.");
  197.   PrintS(" _Hc: Display program credits and copyrights.");
  198.   PrintS(" _HC: Display names of zodiac signs and houses.");
  199.   PrintS(" _HO: Display available planets and other celestial objects.");
  200.   PrintS(" _HA: Display available aspects, their angles, and present orbs.");
  201. #ifdef CONSTEL
  202.   PrintS(" _HF: Display names of astronomical constellations.");
  203. #endif
  204.   PrintS(" _HS: Display information about planets in the solar system.");
  205. #ifdef INTERPRET
  206.   PrintS(" _HI: Display meanings of signs, houses, planets, and aspects.");
  207. #endif
  208.   sprintf(sz,
  209.     " _He: Display all info tables together (_Hc_H_Y_HX_HC_HO_HA%s_HS%s).",
  210. #ifdef CONSTEL
  211.   "_HF",
  212. #else
  213.   "",
  214. #endif
  215. #ifdef INTERPRET
  216.   "_HI");
  217. #else
  218.   "");
  219. #endif
  220.   PrintS(sz);
  221.   PrintS(" _Q: Prompt for more command switches after display finished.");
  222. #ifdef SWITCHES
  223.   PrintS(" _Q0: Like _Q but prompt for additional switches on startup.");
  224. #endif
  225.   PrintS(" _M <1-48>: Run the specified command switch macro.");
  226.   PrintS(" _M0 <1-48> <string>: Define the specified command switch macro.");
  227.   PrintS(" _Y: Display help list of less commonly used command switches.");
  228.   PrintS("\nSwitches which determine the type of chart to display:");
  229.   PrintS(" _v: Display list of object positions (chosen by default).");
  230.   PrintS(" _v0: Like _v but express velocities relative to average speed.");
  231.   PrintS(" _w [<rows>]: Display chart in a graphic house wheel format.");
  232.   PrintS(" _w0 [..]: Like _w but reverse order of objects in houses 4..9.");
  233.   PrintS(" _g: Display aspect and midpoint grid among planets.");
  234.   PrintS(" _g0: Like _g but flag aspect configurations (e.g. Yod's) too.");
  235.   PrintS(" _g0: For comparison charts, show midpoints instead of aspects.");
  236.   PrintS(" _ga: Like _g but indicate applying instead of difference orbs.");
  237.   PrintS(" _gp: Like _g but generate parallel and contraparallel aspects.");
  238.   PrintS(" _a: Display list of all aspects ordered by influence.");
  239.   PrintS(" _a0: Like _a but display aspect summary too.");
  240.   PrintS(" _a[0]a: Like _a but indicate applying and separating orbs.");
  241.   PrintS(" _a[0]p: Like _a but do parallel and contraparallel aspects.");
  242.   PrintS(" _m: Display all object midpoints in sorted zodiac order.");
  243.   PrintS(" _m0: Like _m but display midpoint summary too.");
  244.   PrintS(" _ma: Like _m but show aspects from midpoints to planets as well.");
  245.   PrintS(" _Z: Display planet locations with respect to the local horizon.");
  246.   PrintS(" _Z0: Like _Z but express coordinates relative to polar center.");
  247.   PrintS(" _Zd: Search day for object local rising and setting times.");
  248.   PrintS(" _S: Display x,y,z coordinate positions of planets in space.");
  249.   PrintS(" _l: Display Gauquelin sectors for each planet in chart.");
  250.   PrintS(" _l0: Like _l but approximate sectors using Placidus cusps.");
  251.   PrintS(" _j: Display astrological influences of each object in chart.");
  252.   PrintS(" _j0: Like _j but include influences of each zodiac sign as well.");
  253.   PrintS(" _L [<step>]: Display astro-graph locations of planetary angles.");
  254.   PrintS(" _L0 [..]: Like _L but display list of latitude crossings too.");
  255.   PrintS(" _K: Display a calendar for given month.");
  256.   PrintS(" _Ky: Like _K but display a calendar for the entire year.");
  257.   PrintS(" _d [<step>]: Print all aspects and changes occurring in a day.");
  258.   PrintS(" _dm: Like _d but print all aspects for the entire month.");
  259.   PrintS(" _dy: Like _d but print all aspects for the entire year.");
  260.   PrintS(" _dY <years>: Like _d but search within a number of years.");
  261.   PrintS(" _dp <month> <year>: Print aspects within progressed chart.");
  262.   PrintS(" _dpy <year>: Like _dp but search for aspects within entire year.");
  263.   PrintS(" _dpY <year> <years>: Like _dp but search within number of years.");
  264.   PrintS(" _dp[y]n: Search for progressed aspects in current month/year.");
  265.   PrintS(" _D: Like _d but display aspects by influence instead of time.");
  266.   PrintS(" _E: Display planetary ephemeris for given month.");
  267.   PrintS(" _Ey: Display planetary ephemeris for the entire year.");
  268.   PrintS(" _EY <years>: Display planetary ephemeris for a number of years.");
  269.   PrintS(
  270.     " _e: Print all charts together (i.e. _v_w_g0_a_m_Z_S_l_K_j0_L0_d_D_E).");
  271.   PrintS(
  272.     " _t <month> <year>: Compute all transits to natal planets in month.");
  273.   PrintS(
  274.     " _tp <month> <year>: Compute progressions to natal in month for chart.");
  275.   PrintS(" _tr <month> <year>: Compute all returns in month for chart.");
  276.   PrintS(" _t[p]y: <year>: Compute transits/progressions for entire year.");
  277.   PrintS(" _t[p]Y: <year> <years>: Compute transits for a number of years.");
  278. #ifdef TIME
  279.   PrintS(" _t[py]n: Compute transits to natal planets for current time now.");
  280. #endif
  281.   PrintS(" _T <month> <day> <year>: Display transits ordered by influence.");
  282.   PrintS(" _Tp <month> <day> <year>: Print progressions instead of transits.");
  283. #ifdef TIME
  284.   PrintS(" _T[p]n: Display transits ordered by influence for current date.");
  285. #endif
  286. #ifdef ARABIC
  287.   PrintS(" _P [<parts>]: Display list of Arabic parts and their positions.");
  288.   PrintS(" _P0 [<parts>]: Like _P but display formulas with terms reversed.");
  289.   PrintS(" _P[z,n,f]: Order parts by position, name, or formula.");
  290. #endif
  291. #ifdef INTERPRET
  292.   PrintS(" _I [<columns>]: Print interpretation of selected charts.");
  293. #endif
  294.   PrintS("\nSwitches which affect how the chart parameters are obtained:");
  295. #ifdef TIME
  296.   PrintS(" _n: Compute chart for this exact moment using current time.");
  297.   PrintS(" _n[d,m,y]: Compute chart for start of current day, month, year.");
  298. #endif
  299.   PrintS(" _z [<zone>]: Change the default time zone (for _d_E_t_q options).");
  300.   PrintS(" _z0 [<offset>]: Change the default daylight time setting.");
  301.   PrintS(" _zl <long> <lat>: Change the default longitude & latitude.");
  302.   PrintS(" _zt <time>: Set only the time of current chart.");
  303.   PrintS(" _zd <date>: Set only the day of current chart.");
  304.   PrintS(" _zi <name> <place>: Set name and place strings of current chart.");
  305.   PrintS(" _q <month> <date> <year> <time>: Compute chart with defaults.");
  306.   PrintS(" _qd <month> <date> <year>: Compute chart for noon on date.");
  307.   PrintS(" _qm <month> <year>: Compute chart for first of month.");
  308.   PrintS(" _qy <year>: Compute chart for first day of year.");
  309.   PrintS(" _qa <month> <date> <year> <time> <zone> <long> <lat>:");
  310.   PrintS("     Compute chart automatically given specified data.");
  311.   PrintS(" _qb <month> <date> <year> <time> <daylight> <zone> <long> <lat>:");
  312.   PrintS("     Like _qa but takes additional parameter for daylight offset.");
  313.   PrintS(" _qj <day>: Compute chart for time of specified Julian day.");
  314.   PrintS(" _i <file>: Compute chart based on info in file.");
  315.   PrintS(" _i[2,3,4] <file>: Load chart info into chart slots 2, 3, or 4.");
  316.   PrintS(" _o <file> [..]: Write parameters of current chart to file.");
  317.   PrintS(" _o0 <file> [..]: Like _o but output planet/house positions.");
  318.   PrintS(" _os <file>, > <file>: Redirect output of text charts to file.");
  319.   PrintS("\nSwitches which affect what information is used in a chart:");
  320.   PrintS(" _R [<obj1> [<obj2> ..]]: Restrict specific bodies from displays.");
  321.   PrintS(" _R0 [<obj1> ..]: Like _R but restrict everything first.");
  322.   PrintS(" _R1 [<obj1> ..]: Like _R0 but unrestrict and show all objects.");
  323.   PrintS(" _R[C,u,U]: Restrict all minor cusps, all uranians, or stars.");
  324.   PrintS(" _RT[0,1,C,u,U] [..]: Restrict transiting planets in _t lists.");
  325.   PrintS(" _RA [<asp1> ..]: Restrict aspects by giving them negative orbs.");
  326.   PrintS(" _C: Include angular and non-angular house cusps in charts.");
  327.   PrintS(" _u: Include transneptunian/uranian bodies in charts.");
  328.   PrintS(" _U: Include locations of fixed background stars in charts.");
  329.   PrintS(" _U[z,l,n,b]: Order by azimuth, altitude, name, or brightness.");
  330.   PrintS(" _A <0-18>: Specify the number of aspects to use in charts.");
  331.   PrintS(" _Ao <aspect> <orb>: Specify maximum orb for an aspect.");
  332.   PrintS(" _Am <planet> <orb>: Specify maximum orb allowed to a planet.");
  333.   PrintS(" _Ad <planet> <orb>: Specify orb addition given to a planet.");
  334.   PrintS(" _Aa <aspect> <angle>: Change the actual angle of an aspect.");
  335.   PrintS("\nSwitches which affect how a chart is computed:");
  336. #ifdef PLACALC
  337.   PrintS(" _b: Use ephemeris files for more accurate location computations.");
  338.   PrintS(" _b0: Like _b but display locations to the nearest second too.");
  339. #endif
  340.   PrintS(" _c <value>: Select a different default system of houses.");
  341.   PrintS("     (0 = Placidus, 1 = Koch, 2 = Equal, 3 = Campanus,");
  342.   PrintS("     4 = Meridian, 5 = Regiomontanus, 6 = Porphyry, 7 = Morinus,");
  343.   PrintS("     8 = Topocentric, 9 = Alcabitius, 10 = Equal (MC),");
  344.   PrintS("     11 = Neo-Porphyry, 12 = Whole, 13 = None.)");
  345.   PrintS(" _s [..]: Compute a sidereal instead of the normal tropical chart.");
  346.   PrintS(" _sr: Compute right ascension locations relative to equator.");
  347.   PrintS(
  348.     " _s[z,h,d]: Display locations as in zodiac, hours/minutes, or degrees.");
  349.   PrintS(" _h [<objnum>]: Compute positions centered on specified object.");
  350.   PrintS(" _p <month> <day> <year>: Cast 2ndary progressed chart for date.");
  351.   PrintS(" _p0 <month> <day> <year>: Cast solar arc chart for date.");
  352. #ifdef TIME
  353.   PrintS(" _p[0]n: Cast progressed chart based on current date now.");
  354. #endif
  355.   PrintS(" _pd <days>: Set no. of days to progress / day (default 365.25).");
  356.   PrintS(" _x <value>: Cast harmonic chart based on specified factor.");
  357.   PrintS(" _1 [<objnum>]: Cast chart with specified object on Ascendant.");
  358.   PrintS(" _2 [<objnum>]: Cast chart with specified object on Midheaven.");
  359.   PrintS(" _3: Display objects in their zodiac decan positions.");
  360.   PrintS(" _f: Display houses as sign positions (flip them).");
  361.   PrintS(" _G: Compute houses based on geographic location only.");
  362.   PrintS(" _F <objnum> <sign> <deg>: Force object's position to be value.");
  363.   PrintS(" _+ [<days>]: Cast chart for specified no. of days in the future.");
  364.   PrintS(" _- [<days>]: Cast chart for specified no. of days in the past.");
  365.   PrintS(" _+[m,y] [<value>]: Cast chart for no. of months/years in future.");
  366.   PrintS("\nSwitches for relationship and comparison charts:");
  367.   PrintS(" _r <file1> <file2>: Compute a relationship synastry chart.");
  368.   PrintS(" _rc <file1> <file2>: Compute a composite chart.");
  369.   PrintS(" _rm <file1> <file2>: Compute a time space midpoint chart.");
  370.   PrintS(" _r[c,m]0 <file1> <file2> <ratio1> <ratio2>: Weighted chart.");
  371.   PrintS(" _rd <file1> <file2>: Print time span between files' dates.");
  372. #ifdef BIORHYTHM
  373.   PrintS(" _rb <file1> <file2>: Display biorhythm for file1 at time file2.");
  374. #endif
  375.   PrintS(" _r0 <file1> <file2>: Keep the charts separate in comparison.");
  376.   PrintS(" _rp[0] <file1> <file2>: Like _r0 but do file1 progr. to file2.");
  377.   PrintS(" _rt <file1> <file2>: Like _r0 but treat file2 as transiting.");
  378. #ifdef GRAPH
  379.   PrintS(" _r[3,4]: Make graphics wheel chart tri-wheel or quad-wheel.");
  380. #endif
  381. #ifdef TIME
  382.   PrintS(" _y <file>: Display current house transits for particular chart.");
  383. #ifdef BIORHYTHM
  384.   PrintS(" _y[b,d,p,t] <file>: Like _r0 but compare to current time now.");
  385. #endif
  386. #endif /* TIME */
  387.   PrintS("\nSwitches to access graphics options:");
  388.   PrintS(" _k: Display text charts using Ansi characters and color.");
  389.   PrintS(" _k0: Like _k but only use special characters, not Ansi color.");
  390. #ifdef MSG
  391.   PrintS(" _V: <25,43,50>: Start up with text mode set to number of rows.");
  392. #endif
  393.  
  394.   /* If graphics features are compiled in, call an additional procedure to */
  395.   /* display the command switches offered dealing with the graphics stuff. */
  396.  
  397. #ifdef GRAPH
  398.   DisplaySwitchesX();
  399. #ifdef WIN
  400.   DisplaySwitchesW();  /* Windows version has its own set of switches too. */
  401. #endif
  402. #endif /* GRAPH */
  403. }
  404.  
  405.  
  406. /* Print a list of the obscure command switches that can be passed to the */
  407. /* program and a description of them. This is what the -Y switch prints.  */
  408.  
  409. void DisplaySwitchesRare()
  410. {
  411.   char sz[cchSzDef];
  412.  
  413.   sprintf(sz, "%s (version %s) obscure command switches:",
  414.     szAppName, szVersionCore);
  415.   PrintS(sz);
  416.   PrintS(" _Y: Display this help list.");
  417.   PrintS(" _Yn: Compute location of true instead of mean node.");
  418.   PrintS(" _Yd: Display dates in D/M/Y instead of M/D/Y format.");
  419.   PrintS(" _Yt: Display times in 24 hour instead of am/pm format.");
  420.   PrintS(" _YC: Automatically ignore insignificant house cusp aspects.");
  421.   PrintS(" _Y8: Clip text charts at the rightmost (e.g. 80th) column.");
  422.   PrintS(" _YQ <rows>: Pause text scrolling after a page full has printed.");
  423.   PrintS(" _Yo: Output chart info and position files in old style format.");
  424.   PrintS(" _Yc: Angular cusp objects are house positions instead of angles.");
  425.   PrintS(" _Yz <min>: Forward clock by amount for current moment charts.");
  426.   PrintS(" _Yl <1-36>: Toggle plus zone status of sector for sector chart.");
  427. #ifdef ARABIC
  428.   PrintS(" _YP <-1,0,1>: Set how Arabic parts are computed for night charts.");
  429. #endif
  430.   PrintS(" _Yb <days>: Set number of days to span for biorhythm chart.");
  431.   PrintS(" _YE <obj> <semi-major axis> <eccentricity (3)> <inclination (3)>");
  432.   PrintS("     <perihelion (3)> <ascending node (3)> <time offset (3)>");
  433.   PrintS("     Change orbit of object to be the given elements.");
  434.   PrintS(
  435.     " _YR <obj1> <obj2> <flag1>..<flag2>: Set restrictions for object range.");
  436.   PrintS(
  437.     " _YRT <obj1> <obj2> <flag1>..<flag2>: Transit restrictions for range.");
  438.   PrintS(
  439.     " _YR0 <flag1> <flag2>: Set restrictions for sign, direction changes.");
  440.   PrintS(
  441.     " _YRZ <rise> <zenith> <set> <nadir>: Set restrictions for _Zd chart.");
  442.   PrintS(
  443.     " _YAo <asp1> <asp2> <orb1>..<orb2>: Set aspect orbs for range.");
  444.   PrintS(
  445.     " _YAm <obj1> <obj2> <orb1>..<orb2>: Set max planet orbs for range.");
  446.   PrintS(
  447.     " _YAd <obj1> <obj2> <orb1>..<orb2>: Set planet orb additions for range.");
  448.   PrintS(
  449.     " _YAa <asp1> <asp2> <ang1>..<ang2>: Set planet aspect angles for range.");
  450.   PrintS(
  451.     " _Yj <obj1> <obj2> <inf1>..<inf2>: Set influences for object range.");
  452.   PrintS(
  453.     " _YjC <cusp1> <cusp2> <inf1>..<inf2>: Set influences for house cusps.");
  454.   PrintS(
  455.     " _YjA <asp1> <asp2> <inf1>..<inf2>: Set influences for aspect range.");
  456.   PrintS(
  457.     " _YjT <obj1> <obj2> <inf1>..<inf2>: Set transit influences for range.");
  458.   PrintS(
  459.     " _Yj0 <inf1> <inf2> <inf3> <inf4>: Set influences given to planets");
  460.   PrintS("     in ruling sign, exalted sign, ruling house, exalted house.");
  461.   PrintS(" _YJ <obj> <sign> <cosign>: Set sign planet rules and co-rules.");
  462.   PrintS(" _YJ0 <obj> <sign>: Set zodiac sign given planet exalts in.");
  463.   PrintS(" _YI <obj> <string>: Customize interpretation for object.");
  464.   PrintS(
  465.     " _YIa <sign> <string>: Customize interpretation adjective for sign.");
  466.   PrintS(" _YIv <sign> <string>: Customize interpretation verb for sign.");
  467.   PrintS(" _YIC <house> <string>: Customize interpretation for house.");
  468.   PrintS(" _YIA <asp> <string>: Customize interpretation for aspect.");
  469.   PrintS(" _YIA0 <asp> <string>: Customize aspect interpretation statement.");
  470.   PrintS(" _YkC <fir> <ear> <air> <wat>: Customize element colors.");
  471.   PrintS(" _YkA <asp1> <asp2> <col1>..<col2>: Customize aspect colors.");
  472.   PrintS(" _Yk0 <1..7> <1..7> <col1>..<col2>: Customize 'rainbow' colors.");
  473.   PrintS(" _Yk <0..8> <0..8> <col1>..<col2>: Customize 'general' colors.");
  474.   PrintS(" _YXG <0-2><0-2><0-2><0-3>: Select among different graphic glyphs");
  475.   PrintS("     for Capricorn, Uranus, Pluto, and Lilith.");
  476.   PrintS(" _YXg <cells>: Set number of cells for graphic aspect grid.");
  477.   PrintS(" _YXf <val>: Set usage of actual system fonts in graphic file.");
  478.   PrintS(" _YXp <-1,0,1>: Set paper orientation for PostScript files.");
  479.   PrintS(" _YXp0 <hor> <ver>: Set paper size for PostScript files.");
  480. #ifdef PCG
  481.   PrintS(" _YX <hi-res> <lo-res>: Set modes to use for PC screen graphics.");
  482. #endif
  483.   PrintS(" _0[o,i,q,X]: Disallow file output, input, exiting, and graphics.");
  484.   PrintS(" _;: Ignore rest of command line and treat it as a comment.");
  485. }
  486.  
  487.  
  488. /* Print out a list of the various objects - planets, asteroids, house     */
  489. /* cusps, stars - recognized by the program, and their index values. This  */
  490. /* is displayed when the -O switch is invoked. For some objects, display   */
  491. /* additional information, e.g. ruling signs for planets, brightnesses and */
  492. /* positions in the sky for fixed stars, etc.                              */
  493.  
  494. void PrintObjects()
  495. {
  496.   char sz[cchSzDef];
  497.   CI ci;
  498.   int i, j, k;
  499.   real Off;
  500.  
  501.   if (!us.fCusp)
  502.     for (i = cuspLo; i <= cuspHi; i++)    /* Set up restrictions properly: */
  503.       ignore[i] = fTrue;                  /* Minor cusps and uranians      */
  504.   if (!us.fUranian)                       /* included only if -C and -u    */
  505.     for (i = uranLo; i <= uranHi; i++)    /* switches are in effect.       */
  506.       ignore[i] = fTrue;
  507.   sprintf(sz, "%s planets and objects:\n", szAppName);
  508.   PrintSz(sz);
  509.   PrintSz("No. Name       Rule Co-Rule Fall Co-Fall Exalt Debilitate\n\n");
  510.   for (i = 1; i <= oNorm; i++) if (!ignore[i]) {
  511.     AnsiColor(kObjA[i]);
  512.     sprintf(sz, "%2d %-12s", i, szObjName[i]); PrintSz(sz);
  513.  
  514.     /* Print rulerships and exaltations for the planets. */
  515.  
  516.     j = ruler1[i]; k = ruler2[i];
  517.     if (j) {
  518.       sprintf(sz, "%c%c%c", chSig3(j)); PrintSz(sz);
  519.     } else
  520.       PrintSz("   ");
  521.     PrintSz("  ");
  522.     if (k) {
  523.       sprintf(sz, "%c%c%c", chSig3(k)); PrintSz(sz);
  524.     } else
  525.       PrintSz("   ");
  526.     PrintTab(' ', 5);
  527.     if (j) {
  528.       sprintf(sz, "%c%c%c", chSig3(Mod12(j+6))); PrintSz(sz);
  529.     } else
  530.       PrintSz("   ");
  531.     PrintSz("  ");
  532.     if (k) {
  533.       sprintf(sz, "%c%c%c", chSig3(Mod12(k+6))); PrintSz(sz);
  534.     } else
  535.       PrintSz("   ");
  536.     PrintTab(' ', 5);
  537.     j = exalt[i];
  538.     if (j) {
  539.       sprintf(sz, "%c%c%c", chSig3(j)); PrintSz(sz);
  540.     } else
  541.       PrintSz("   ");
  542.     PrintSz("   ");
  543.     if (j) {
  544.       sprintf(sz, "%c%c%c", chSig3(Mod12(j+6))); PrintSz(sz);
  545.     } else
  546.       PrintSz("   ");
  547.     if (FCusp(i)) {
  548.       sprintf(sz, "  House Cusp #%d", i-cuspLo+1); PrintSz(sz);
  549.     } else if (FUranian(i)) {
  550.       sprintf(sz, "  Uranian #%d", i-uranLo+1); PrintSz(sz);
  551.     }
  552.     PrintL();
  553.   }
  554.  
  555.   /* Now, if -U in effect, read in and display stars in specified order. */
  556.  
  557.   if (us.nStar) {
  558.     ci = ciCore;
  559.     Off = ProcessInput(fTrue);
  560.     ciCore = ci;
  561.     ComputeStars(us.fSidereal ? 0.0 : -Off);
  562.     for (i = starLo; i <= starHi; i++) if (!ignore[i]) {
  563.       j = oNorm+starname[i-oNorm];
  564.       AnsiColor(kObjA[j]);
  565.       sprintf(sz, "%2d %-12s", i, szObjName[j]); PrintSz(sz);
  566.       sprintf(sz, "Star #%2d   ", i-oNorm); PrintSz(sz);
  567.       PrintZodiac(planet[j]);
  568.       PrintTab(' ', 4);
  569.       PrintAltitude(planetalt[j]);
  570.       sprintf(sz, " %5.2f\n", rStarBright[j-oNorm]); PrintSz(sz);
  571.     }
  572.   }
  573.   AnsiColor(kDefault);
  574. }
  575.  
  576.  
  577. /* Print out a list of all the aspects recognized by the program, and info  */
  578. /* about them: their names, index numbers, degree angles, present orbs, and */
  579. /* the description of their glyph. This gets displayed when the -A switch   */
  580. /* is invoked (without any argument).                                       */
  581.  
  582. void PrintAspects()
  583. {
  584.   char sz[cchSzDef];
  585.   int i;
  586.  
  587.   sprintf(sz,
  588.     "%s aspects:\nNo. Name         Abbrev. ", szAppName); PrintSz(sz);
  589.   PrintSz("Angle    Orb          Description of glyph\n\n");
  590.   for (i = 1; i <= cAspect; i++) {
  591.     AnsiColor(kAspA[i]);
  592.     sprintf(sz, "%2d %-15s(%s) %6.2f +/- %1.0f degrees - %s\n",
  593.       i, szAspectName[i], szAspectAbbrev[i],
  594.       rAspAngle[i], rAspOrb[i], szAspectGlyph[i]); PrintSz(sz);
  595.   }
  596.   AnsiColor(kDefault);
  597. }
  598.  
  599.  
  600. /* Print out a list of the 12 signs and houses of the zodiac, and their    */
  601. /* standard and traditional names, as done when the -H0 switch is invoked. */
  602.  
  603. void PrintSigns()
  604. {
  605.   char sz[cchSzDef];
  606.   int i;
  607.  
  608.   sprintf(sz, "%s signs and houses:\n", szAppName); PrintSz(sz);
  609.   PrintSz("Sign        English name      House Traditional name\n\n");
  610.   for (i = 1; i <= cSign; i++) {
  611.     AnsiColor(kSignA(i));
  612.     sprintf(sz, "%-12sthe %-14s%2d%s  House of %s\n",
  613.       szSignName[i], szSignEnglish[i], i, szSuffix[i], szHouseTradition[i]);
  614.     PrintSz(sz);
  615.   }
  616.   AnsiColor(kDefault);
  617. }
  618.  
  619.  
  620. #ifdef CONSTEL
  621. /* Given the standard 'noun' form of a constellation string, convert it  */
  622. /* to its genitive or posessive form. Some standard rules are used but a */
  623. /* special instructions string is passed for special cases.              */
  624.  
  625. char *GetSzGenitive(szGen, szInst)
  626. char *szGen, *szInst;
  627. {
  628.   char *pch, ch1, ch2;
  629.   int cch;
  630.  
  631.   pch = szGen + CchSz(szGen);
  632.   if (*szInst == ' ')            /* Instructions starting with a space or */
  633.     szInst++;                    /* that are empty means no special case. */
  634.   else if (*szInst) {
  635.     cch = *szInst - '0';
  636.     if (cch < 10) {          /* Instructions starting with a number means */
  637.       szInst++;              /* hack off that many characters of string.  */
  638.       pch -= cch;
  639.     }
  640.     while (*szInst > '9')  /* Instructions end with characters to append. */
  641.       *pch++ = *szInst++;
  642.     *pch = chNull;
  643.     return szInst;
  644.   }
  645.   ch1 = *(pch-1);
  646.   ch2 = *(pch-2);
  647.   if (ch1 == 'a') {           /* Standard rule: 'a' ending -> 'ae'. */
  648.     *pch++ = 'e';
  649.     *pch = chNull;
  650.   } else if (ch1 == 's' && ch2 == 'u') {     /* 'us' ending -> 'i'. */
  651.     *(pch-2) = 'i';
  652.     *(pch-1) = chNull;
  653.   } else if (ch1 == 'm' && ch2 == 'u') {     /* 'um' ending -> 'i'. */
  654.     *(pch-2) = 'i';
  655.     *(pch-1) = chNull;
  656.   } else if (ch1 == 'x')     /* Standard rule: 'x' ending -> 'cis'. */
  657.     sprintf(pch-1, "cis");
  658.   return szInst;
  659. }
  660.  
  661.  
  662. /* Given a constellation index, fill out a string with the genitive or   */
  663. /* posessive form of its name. This basically just calls GetSzGenitive() */
  664. /* above, however it has to be called twice for names having two words.  */
  665.  
  666. void GetSzConstel(szGen, i)
  667. char *szGen;
  668. int i;
  669. {
  670.   char sz1[cchSzDef], sz2[cchSzDef], *pchSpace, *szInst;
  671.  
  672.   sprintf(szGen, "%s", szCnstlName[i]);
  673.   for (pchSpace = szGen; *pchSpace && *pchSpace != ' '; pchSpace++)
  674.     ;
  675.   szInst = (char *)szCnstlGenitive[i];
  676.   if (*pchSpace == chNull) {
  677.     GetSzGenitive(szGen, szInst);
  678.     return;
  679.   }
  680.   *pchSpace = chNull;
  681.   if (szInst[0] == '!') {
  682.     GetSzGenitive(szGen, szInst+1);
  683.     return;
  684.   }
  685.   sprintf(sz1, "%s", szGen);
  686.   sprintf(sz2, "%s", pchSpace+1);
  687.   szInst = GetSzGenitive(sz1, szInst);
  688.   GetSzGenitive(sz2, szInst);
  689.   sprintf(szGen, "%s %s", sz1, sz2);
  690. }
  691.  
  692.  
  693. /* Print out a list of the 88 constellations used in astronomy, in their  */
  694. /* standard, English, and genitive forms, as invoked with the -HF switch. */
  695.  
  696. void PrintConstellations()
  697. {
  698.   int i, j = eWat;
  699.   char szGen[cchSzDef], sz[cchSzDef], chLast = chNull;
  700.  
  701.   sprintf(sz, "%s constellations:\n", szAppName); PrintSz(sz);
  702.   PrintSz("No. Name                Abbrev.   ");
  703.   PrintSz("Meaning            Genitive form\n\n");
  704.   for (i = 1; i <= cCnstl; i++) {
  705.     if (szCnstlName[i][0] != chLast) {
  706.       chLast = szCnstlName[i][0];
  707.       j = j + 1 & 3;
  708.       AnsiColor(kElemA[j]);
  709.     }
  710.     sprintf(sz, "%2d: %-19s (%s) ", i, szCnstlName[i], szCnstlAbbrev[i]);
  711.     PrintSz(sz);
  712.     if (szCnstlMeaning[i][0] == ' ')
  713.       sprintf(sz, "%-22s", szCnstlMeaning[i]+1);
  714.     else
  715.       sprintf(sz, "the %-18s", szCnstlMeaning[i]);
  716.     PrintSz(sz);
  717.     GetSzConstel(szGen, i);
  718.     sprintf(sz, " (%s)\n", szGen); PrintSz(sz);
  719.   }
  720.   AnsiColor(kDefault);
  721. }
  722. #endif /* CONSTEL */
  723.  
  724.  
  725. /* Print out a list of the planets in the solar system (and our Moon), */
  726. /* listing astronomical info on them, as invoked with the -HS switch.  */
  727.  
  728. void PrintOrbit()
  729. {
  730.   char sz[cchSzDef];
  731.   int i;
  732.   real r;
  733.  
  734.   sprintf(sz, "%s planets:\n", szAppName); PrintSz(sz);
  735.   PrintSz("   Name: Distance   Year Diameter     Day       Mass Density  ");
  736.   PrintSz("Axis Satellites\n\n");
  737.   for (i = 0; i <= oVes; i++) {
  738.     AnsiColor(kObjA[i]);
  739.     sprintf(sz, "%7s:%9.3f%7.2f%9.3f", szObjName[i],
  740.       rObjDist[i]/rObjDist[0], rObjYear[i], rObjDiam[i]/rObjDiam[0]);
  741.     PrintSz(sz);
  742.     if (i <= oPlu) {
  743.       r = rObjDiam[i]*1000.0/2.0;
  744.       sprintf(sz, "%8.2f%11.3f%8.2f%6.2f%11d",
  745.         rObjDay[i], rObjMass[i],
  746.         (rObjMass[i]*5.974E24/1000.0)/((4.0/3.0)*(r*r*r)*rPi),
  747.         rObjAxis[i], cSatellite[i]);
  748.       PrintSz(sz);
  749.     }
  750.     PrintL();
  751.   }
  752.   AnsiColor(kDefault);
  753. }
  754.  
  755.  
  756. #ifdef ARABIC
  757. /* Compare the strings corresponding to two Arabic part formulas. Like   */
  758. /* NCompareSz, this returns 0 if they are equal, a positive value if the */
  759. /* first is greater, and negative if the second is greater.              */
  760.  
  761. int NCompareSzPart(ap1, ap2)
  762. int ap1, ap2;
  763. {
  764.   char *pch1, *pch2;
  765.   int ich;
  766.  
  767.   pch1 = ai[ap1].form; pch2 = ai[ap2].form;
  768.   for (ich = 0; pch1[ich] && pch1[ich] == pch2[ich]; ich++) {
  769.     if (!us.fArabicFlip) {
  770.  
  771.       /* If formulas are being displayed in alternate form, we need to */
  772.       /* effectively swap two sections in the string and then compare. */
  773.  
  774.       if (ich == 2)
  775.         ich = 5;
  776.       else if (ich == 8)
  777.         ich = 2;
  778.       else if (ich == 5)
  779.         ich = 8;
  780.     }
  781.   }
  782.   return pch1[ich] - pch2[ich];
  783. }
  784.  
  785.  
  786. /* Print out a list of all the Arabic parts in the current chart, computing */
  787. /* their positions first, as brought up with the -P switch.                 */
  788.  
  789. void DisplayArabic()
  790. {
  791.   real rPart[cPart], rBit[3], rCur;
  792.   char sz[cchSzDef], *pch, ch;
  793.   int iPart[cPart], h, i, j, k, l;
  794.  
  795.   PrintSz("Num."); PrintTab(' ', 20); PrintSz("Name Position");
  796.   PrintTab(' ', 1 + 4 * is.fSeconds);
  797.   PrintSz("House Formula              Flip Type\n");
  798.  
  799.   /* Calculate the zodiac positions of all the parts. */
  800.  
  801.   for (i = 0; i < cPart; i++) {
  802.     rPart[i] = -rDegMax;
  803.     if (i >= us.nArabicParts)
  804.       goto LNextPart;
  805.     for (j = 0; j < 3; j++) {
  806.       pch = &ai[i].form[j*3];
  807.       ch = pch[1];
  808.       if (ch == ' ')
  809.         k = oAsc;
  810.       else if (ch == 'F')
  811.         k = -apFor;
  812.       else if (ch == 'S')
  813.         k = -apSpi;
  814.       else
  815.         k = (ch-'0') * 10 + (pch[2]-'0');
  816.       ch = *pch;
  817.       if (ch == 'h')      /* House cusp */
  818.         rCur = chouse[k];
  819.       else if (ch == 'r') /* Ruler of house cusp */
  820.         rCur = planet[rules[SFromZ(chouse[k])]];
  821.       else if (ch == 'j') /* 10 degrees of house cusp */
  822.         rCur = chouse[k] + 10.0;
  823.       else if (ch == 'H') /* Planet's house */
  824.         rCur = chouse[inhouse[k]];
  825.       else if (ch == 'R') /* Ruler of planet's house */
  826.         rCur = planet[rules[SFromZ(chouse[inhouse[k]])]];
  827.       else if (ch == 'D') /* Dispositor / ruler of planet's position */
  828.         rCur = planet[rules[SFromZ(planet[k])]];
  829.       else if (FBetween(ch, '0', '3'))
  830.         rCur = (real)((ch-'0') * 100 + k);
  831.       else {
  832.         if (k < 1) {
  833.           rCur = rPart[-k];
  834.           if (rCur < 0.0)
  835.             goto LNextPart;
  836.         } else {
  837.           if (ignore[k] && (us.fCusp || !FCusp(k)))
  838.             goto LNextPart;
  839.           else
  840.             rCur = planet[k];
  841.         }
  842.       }
  843.       rBit[j] = rCur;
  844.     }
  845.     rCur = rBit[1] - rBit[2];
  846.     if (us.nArabicNight < 0 || (ai[i].form[9] == 'F' &&
  847.       inhouse[oSun] < sLib && us.nArabicNight == 0))
  848.       rCur = -rCur;
  849.     rCur = Mod(rCur + rBit[0]);
  850.     rPart[i] = rCur;
  851. LNextPart:
  852.     iPart[i] = i;
  853.   }
  854.  
  855.   /* Sort parts to figure out what order to display them in. */
  856.  
  857.   if (us.nArabic > 1) for (i = 1; i < cPart; i++) {
  858.     j = i-1;
  859.  
  860.     /* Compare part zodiac locations for -Pz switch. */
  861.  
  862.     if (us.nArabic == 'z') while (j >= 0 &&
  863.       rPart[iPart[j]] > rPart[iPart[j+1]]) {
  864.       SwapN(iPart[j], iPart[j+1]);
  865.       j--;
  866.  
  867.     /* Compare part names for -Pn switch. */
  868.  
  869.     } else if (us.nArabic == 'n') while (j >= 0 && NCompareSz(
  870.       ai[iPart[j]].name, ai[iPart[j+1]].name) > 0) {
  871.       SwapN(iPart[j], iPart[j+1]);
  872.       j--;
  873.  
  874.     /* Compare part formulas for -Pf switch. */
  875.  
  876.     } else if (us.nArabic == 'f') while (j >= 0 && NCompareSzPart(
  877.       iPart[j], iPart[j+1]) > 0) {
  878.       SwapN(iPart[j], iPart[j+1]);
  879.       j--;
  880.     }
  881.   }
  882.  
  883.   /* Display the positions and formulas of the parts. */
  884.  
  885.   for (h = i = 0; i < cPart; i++) {
  886.     l = iPart[i];
  887.     if (rPart[l] < 0.0)
  888.       continue;
  889.     sprintf(sz, "%3d: %23.23s ", ++h, ai[l].name); PrintSz(sz);
  890.     PrintZodiac(rPart[l]);
  891.     j = HousePlaceIn(rPart[l]);
  892.     sprintf(sz, " [%2d%s] ", j, szSuffix[j]);
  893.     AnsiColor(kSignA(j)); PrintSz(sz); AnsiColor(kDefault);
  894.     PrintCh('(');
  895.     for (j = 0; j < 3; j++) {
  896.       k = j < 1 || us.fArabicFlip ? j : 3-j;
  897.       pch = &ai[l].form[k*3];
  898.       ch = pch[1];
  899.       if (ch == ' ')
  900.         k = oAsc;
  901.       else if (ch == 'F')
  902.         k = -apFor;
  903.       else if (ch == 'S')
  904.         k = -apSpi;
  905.       else
  906.         k = (ch-'0') * 10 + (pch[2]-'0');
  907.       ch = *pch;
  908.       if (k < 1) {
  909.         AnsiColor(kObjA[oFor]);
  910.         sprintf(sz, "%3.3s", ai[-k].name); PrintSz(sz);
  911.       } else {
  912.         if (ch == ' ' || ch == 'H' || ch == 'R' || ch == 'D') {
  913.           AnsiColor(kSignA(ruler1[k]));
  914.           sprintf(sz, "%c%c%c", chObj3(k));
  915.         } else if (FBetween(ch, '0', '3')) {
  916.           k = (ch-'0') * 100 + k;
  917.           AnsiColor(kSignA(k/30+1));
  918.           sprintf(sz, "%2d%c%c%c", k%30, chSig3(k/30+1));
  919.         } else {
  920.           AnsiColor(kSignA(k));
  921.           sprintf(sz, "%3d", k);
  922.         }
  923.         PrintSz(sz);
  924.       }
  925.       AnsiColor(kDefault);
  926.       if (sz[3] == chNull) {
  927.         PrintCh(' ');
  928.         switch (ch) {
  929.         case 'h': ch = ' '; break;
  930.         case 'r': ch = 'R'; break;
  931.         case 'j': ch = '&'; break;
  932.         default: ch = *pch;
  933.         }
  934.         PrintCh(ch);
  935.       }
  936.       if (j < 2) {
  937.         sprintf(sz, " %c ", (j < 1 == us.fArabicFlip) ? '+' : '-');
  938.         PrintSz(sz);
  939.       }
  940.     }
  941.     PrintCh(' ');
  942.     ch = ai[l].form[9];
  943.     switch (ch) {
  944.     case 'F': PrintSz("Y"); break;
  945.     default: AnsiColor(kWhite); PrintSz("N"); AnsiColor(kDefault); break;
  946.     }
  947.     PrintSz(") ");
  948.     ch = ai[l].form[10];
  949.     switch (ch) {
  950.     case 'C': AnsiColor(kElemA[eWat]); PrintSz("Comm."); break;
  951.     case 'E': AnsiColor(kElemA[eFir]); PrintSz("Event"); break;
  952.     case 'H': AnsiColor(kElemA[eEar]); PrintSz("Hora."); break;
  953.     }
  954.     AnsiColor(kDefault);
  955.     PrintL();
  956.   }
  957. }
  958. #endif /* ARABIC */
  959.  
  960.  
  961. #ifdef GRAPH
  962. /* Print a list of every key that one can press in a graphics window to do  */
  963. /* a certain function, and a description of what it does, as displayed when */
  964. /* one presses the 'H' or '?' key, and as shown with the -HX switch.        */
  965.  
  966. void DisplayKeysX()
  967. {
  968.   char sz[cchSzDef];
  969.  
  970.   sprintf(sz, "%s graphics screen key press options (version %s):",
  971.     szAppName, szVersionCore);
  972.   PrintS(sz);
  973.   PrintS(" Press 'H' or '?' to display this list of key options.");
  974.   PrintS(" Press 'p' to toggle pause status on or off.");
  975.   PrintS(" Press 'x' to toggle fg/bg colors on screen.");
  976.   PrintS(" Press 'm' to toggle color/monochrome display on screen.");
  977.   PrintS(" Press 'i' to toggle status of the minor chart modification.");
  978.   PrintS(" Press 't' to toggle header info on current chart on screen.");
  979.   PrintS(" Press 'b' to toggle drawing of a border around the chart.");
  980.   PrintS(" Press 'l' to toggle labeling of object points in chart.");
  981.   PrintS(" Press 'j' to toggle not clearing screen between chart updates.");
  982.   PrintS(" Press 'v' to display current chart positions on text screen.");
  983.   PrintS(" Press 'R', 'C', 'u', 'U' to toggle restriction status of minor");
  984.   PrintS("       objects, minor house cusps, uranian planets, and stars.");
  985.   PrintS(" Press 'c' to toggle relationship comparison chart mode.");
  986.   PrintS(" Press 's', 'h', 'f', 'g' to toggle status of sidereal zodiac,");
  987.   PrintS("       heliocentric charts, domal charts, and decan charts.");
  988.   PrintS(" Press 'O' and 'o' to recall/store a previous chart from memory.");
  989. #ifdef X11
  990.   PrintS(" Press 'B' to dump current window contents to root background.");
  991. #else
  992.   PrintS(" Press 'B' to resize chart display to full size of screen.");
  993. #endif
  994.   PrintS(" Press 'Q' to resize chart display to a square.");
  995.   PrintS(" Press '<' and '>' to decrease/increase the scale size of the");
  996.   PrintS("       glyphs and the size of world map.");
  997.   PrintS(" Press '[' and ']' to decrease/increase tilt in globe display.");
  998.   PrintS(" Press '+' and '-' to add/subtract a day from current chart.");
  999. #ifdef TIME
  1000.   PrintS(" Press 'n' to set chart information to current time now.");
  1001. #endif
  1002.   PrintS(" Press 'N' to toggle animation status on or off. Charts will");
  1003.   PrintS("       be updated to current status and globe will rotate.");
  1004.   PrintS(" Press '!'-'(' to begin updating current chart by adding times.");
  1005.   PrintS("       !: seconds, @: minutes, #: hours, $: days, %: months,");
  1006.   PrintS("       ^: years, &: years*10, *: years*100, (: years*1000.");
  1007.   PrintS(" Press 'r' to reverse direction of time-lapse or animation.");
  1008.   PrintS(" Press '1'-'9' to set rate of animation to 'n' degrees, etc.");
  1009. #ifdef PCG
  1010.   PrintS(" Press '1'-'9' to determine section of chart to show if clipped.");
  1011. #endif
  1012.   PrintS(
  1013.     " Press 'V','A','Z','S','M','K','J','L','E','W','G','P' to switch to");
  1014.   PrintS(
  1015.     "       normal (_v), grid (_g), local (_Z), space (_S), sector (_l),");
  1016.   PrintS("       calendar (_K), dispositor (_j), astro-graph (_L), ephemeris");
  1017.   PrintS("       (_E), world map (_XW), globe (_XG), and polar (_XP) modes.");
  1018.   PrintS(" Press 'Y' to switch to biorhythm relation chart mode.");
  1019.   PrintS(" Press '0' to toggle between _Z,_Z0 & _XW,_XW0 & _E,_Ey modes.");
  1020. #ifdef CONSTEL
  1021.   PrintS(" Press 'F' to toggle between world and constellation map modes.");
  1022. #endif
  1023. #ifdef PCG
  1024.   PrintS(" Press 'F1'..'F12' [plus Shift,Ctrl,Alt] to run macros 1..48.");
  1025. #endif
  1026.   PrintS(" Press 'space' to force redraw of current graphics display.");
  1027.   PrintS(" Press 'del' to clear the graphics screen and not redraw.");
  1028. #ifdef PCG
  1029.   PrintS(" Press 'tab' to toggle between graphics resolutions.");
  1030. #endif
  1031.   PrintS(" Press 'enter' to input a command line of general switches.");
  1032.   PrintS(" Press 'q' to terminate graphics and the program.");
  1033. #ifdef MOUSE
  1034.   PrintL();
  1035. #ifdef X11
  1036.   PrintS(" Left   mouse button: Draw line strokes on chart in window.");
  1037.   PrintS(" Middle mouse button: Print coordinates of pointer on world map.");
  1038.   PrintS(" Right  mouse button: Terminate the window and program.");
  1039. #endif
  1040. #ifdef PCG
  1041.   PrintS(" Left  mouse button: Draw line strokes on chart in screen.");
  1042.   PrintS(" Right mouse button: Set coordinates to pointer on world map.");
  1043. #endif
  1044. #endif /* MOUSE */
  1045. }
  1046.  
  1047.  
  1048. /* Print a list of every command switch dealing with the graphics features  */
  1049. /* that can be passed to the program, and a description of what it does.    */
  1050. /* This is part of what the -H switch prints, if graphics were compiled in. */
  1051.  
  1052. void DisplaySwitchesX()
  1053. {
  1054.   PrintS(" _X: Create a graphics chart instead of displaying it as text.");
  1055. #ifdef ISG
  1056.   PrintS(" _Xb: Create bitmap file instead of putting graphics on screen.");
  1057. #endif
  1058.   PrintS(" _Xb[n,c,v,a,b]: Set bitmap file output mode to X11 normal,");
  1059.   PrintS("     compacted, very compact, Ascii (bmtoa), or Windows bmp.");
  1060. #ifdef PS
  1061.   PrintS(" _Xp: Create PostScript stroke graphic instead of bitmap file.");
  1062.   PrintS(" _Xp0: Like _Xp but create complete instead of encapsulated file.");
  1063. #endif
  1064. #ifdef META
  1065.   PrintS(" _XM[0]: Create Windows metafile stroke graphic instead of bitmap.");
  1066. #endif
  1067.   PrintS(" _Xo <file>: Write output bitmap or graphic to specified file.");
  1068. #ifdef X11
  1069.   PrintS(" _XB: Display X chart on root instead of in a separate window.");
  1070. #endif
  1071.   PrintS(" _Xm: Create monochrome graphic instead of one in color.");
  1072.   PrintS(" _Xr: Create chart graphic in reversed colors (white background).");
  1073. #ifdef X11
  1074.   PrintS(" _Xw <hor> [<ver>], _ge[..]: Change the size of chart graphic.");
  1075. #else
  1076.   PrintS(" _Xw <hor> [<ver>]: Change the size of chart graphic.");
  1077. #endif
  1078.   PrintS(" _Xs <100,200,300,400>: Change the size of map or characters by %.");
  1079.   PrintS(" _Xi: Create chart graphic in slightly modified form.");
  1080.   PrintS(" _Xt: Inhibit display of chart info at bottom of graphic.");
  1081.   PrintS(" _Xu: Inhibit display of a border around graphic.");
  1082.   PrintS(" _Xl: Inhibit labeling of object points in chart graphic.");
  1083.   PrintS(" _Xj: Don't clear screen between chart updates, drawing trails.");
  1084.   PrintS(" _X1 <object>: Rotate wheel charts so object is at left edge.");
  1085.   PrintS(" _X2 <object>: Rotate wheel charts so object is at top edge.");
  1086. #ifdef X11
  1087.   PrintS(" _Xd <name>, _di[..] <name>: Open X window on specified display.");
  1088. #endif
  1089.   PrintS(" _XW: Simply create an image of the world map.");
  1090.   PrintS(" _XW0: Like _XW but do a non-rectangular Mollewide projection.");
  1091.   PrintS(" _XG [<degrees>]: Display the image of the world as a globe.");
  1092.   PrintS(" _XP: Like _XG but create the globe from a polar projection.");
  1093. #ifdef CONSTEL
  1094.   PrintS(" _XF: Display maps as constellations on the celestial sphere.");
  1095. #endif
  1096. #ifdef ISG
  1097.   PrintS(" _Xn [<mode>]: Start up chart or globe display in animation mode.");
  1098.   PrintS(" _HX: Display list of key press options for screen graphics.");
  1099. #endif
  1100. }
  1101.  
  1102.  
  1103. #ifdef WIN
  1104. /* Print a list of every command switch dealing with the Windows features */
  1105. /* that can be passed to the program, and a description of what it does.  */
  1106. /* This is part of what the -H switch prints in the MS Windows version.   */
  1107.  
  1108. void DisplaySwitchesW()
  1109. {
  1110.   PrintS(" _W <value>: Run given Windows menu command internally.");
  1111.   PrintS(" _WN <1-32000>: Set animation update delay in milliseconds.");
  1112.   PrintS(" _WM <1-48> <text>: Set Windows menu text for macro command.");
  1113.   PrintS(" _Wn: Don't redraw screen until user forces update.");
  1114. }
  1115. #endif
  1116. #endif /* GRAPH */
  1117.  
  1118.  
  1119. /* This is the dispatch procedure for all the generic table information      */
  1120. /* routines, such as those displaying the -H switch list, the list of signs, */
  1121. /* objects, default interpretations, and so on not requiring a date or time. */
  1122.  
  1123. bool FPrintTables()
  1124. {
  1125. #ifdef WIN
  1126.   if (us.fGraphics)
  1127.     return fFalse;
  1128. #endif
  1129.   if (us.fCredit) {
  1130.     DisplayCredits();
  1131.     is.fMult = fTrue;
  1132.   }
  1133.   if (us.fSwitch) {
  1134.     if (is.fMult)
  1135.       PrintL2();
  1136.     DisplaySwitches();
  1137.     is.fMult = fTrue;
  1138.   }
  1139.   if (us.fSwitchRare) {
  1140.     if (is.fMult)
  1141.       PrintL2();
  1142.     DisplaySwitchesRare();
  1143.     is.fMult = fTrue;
  1144.   }
  1145. #ifdef GRAPH
  1146.   if (us.fKeyGraph) {
  1147.     if (is.fMult)
  1148.       PrintL2();
  1149.     DisplayKeysX();
  1150.     is.fMult = fTrue;
  1151.   }
  1152. #endif
  1153.   if (us.fSign) {
  1154.     if (is.fMult)
  1155.       PrintL2();
  1156.     PrintSigns();
  1157.     is.fMult = fTrue;
  1158.   }
  1159.   if (us.fObject) {
  1160.     if (is.fMult)
  1161.       PrintL2();
  1162.     PrintObjects();
  1163.     is.fMult = fTrue;
  1164.   }
  1165.   if (us.fAspect) {
  1166.     if (is.fMult)
  1167.       PrintL2();
  1168.     PrintAspects();
  1169.     is.fMult = fTrue;
  1170.   }
  1171. #ifdef CONSTEL
  1172.   if (us.fConstel) {
  1173.     if (is.fMult)
  1174.       PrintL2();
  1175.     PrintConstellations();
  1176.     is.fMult = fTrue;
  1177.   }
  1178. #endif
  1179.   if (us.fOrbitData) {
  1180.     if (is.fMult)
  1181.       PrintL2();
  1182.     PrintOrbit();
  1183.     is.fMult = fTrue;
  1184.   }
  1185. #ifdef INTERPRET
  1186.   if (us.fMeaning) {
  1187.     if (is.fMult)
  1188.       PrintL2();
  1189.     InterpretGeneral();
  1190.     InterpretAspectGeneral();
  1191.     is.fMult = fTrue;
  1192.   }
  1193. #endif
  1194.  
  1195.   /* If we also already have enough information to generate a chart,    */
  1196.   /* then go on and do so, else exit. (So things like "-H -i file" will */
  1197.   /* work, but things like just "-H" will print and exit right away.)   */
  1198.  
  1199. #ifndef WIN
  1200.   return is.fMult && !is.fHaveInfo;
  1201. #else
  1202.   return is.fMult;
  1203. #endif
  1204. }
  1205.  
  1206. /* charts0.c */
  1207.